<style lang="less">
.message-con {
  padding: 0 10px;
  .ivu-tooltip {
    line-height: 0;
  }
  i {
    cursor: pointer;
  }
}
</style>
<template>
    <div @click="showMessage" class="message-con">
        <Tooltip :content="value > 0 ? '有' + value + '条未读消息' : '无未读消息'" placement="bottom">
            <Badge :count="value" dot>
                <Icon type="ios-notifications-outline" :size="25"></Icon>
            </Badge>
        </Tooltip>
    </div>
</template>

<script>
export default {
  name: "messageTip",
  props: {
    value: {
      type: Number,
      default: 0
    }
  },
  methods: {
    showMessage() {
      /*
            this.$router.push({
                name: 'message_index'
            });
            */
      alert("查看message列表！");
    }
  }
};
</script>
